﻿<!DOCTYPE html>
<html lang="es-ar">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>JACOVINO - @ViewBag.Title</title>
    @Styles.Render("~/Content/css")
    @Styles.Render("~/Content/themes/base/css")
    @Scripts.Render("~/bundles/modernizr")

</head>
<body>
    @if (HttpContext.Current.User.Identity.IsAuthenticated && HttpContext.Current.User.Identity.Name == "admin")
    {
        <div class="navbar navbar-fixed-top">
            <div class="navbar-inner">
                <div class="container">
                    <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    @Html.ActionLink("JACOVINO", "List", "Orden", null, new { @class = "brand" })

                    <div class="nav-collapse collapse">
                        <ul class="nav">
                            <li>@Html.ActionLink("Ordenes", "List", "Orden")</li>
                            <li class="divider-vertical"></li>
                            <li>@Html.ActionLink("Deliveries", "List", "Envio")</li>
                            <li class="divider-vertical"></li>
                            @*<li>@Html.ActionLink("Reservas", "List", "Configuracion")</li>
                                <li class="divider-vertical"></li>
                                <li>@Html.ActionLink("Alq. Pool", "List", "Configuracion")</li>
                                <li class="divider-vertical"></li>
                                <li>@Html.ActionLink("Pedidos en Cocina", "List", "Configuracion")</li>*@
                        </ul>
                        <ul class="nav pull-right">
                            <li class="dropdown">
                                <a id="dropConf" href="#" role="button" class="dropdown-toggle" data-toggle="dropdown">
                                    Reportes
                                </a>
                                <ul class="dropdown-menu" role="menu" aria-labelledby="dropConf">
                                    <li role="presentation">
                                        @Html.ActionLink("Ventas", "Ventas", "Reporte", null, new { @tabindex = "-1", @role = "menuitem" })
                                    </li>
                                    <li role="presentation">
                                        @Html.ActionLink("Comisiones Por Ventas", "ComisionVentas", "Reporte", null, new { @tabindex = "-1", @role = "menuitem" })
                                    </li>
                                </ul>
                            </li>
                            <li class="divider-vertical"></li>
                            <li class="dropdown">
                                <a id="dropConf" href="#" role="button" class="dropdown-toggle" data-toggle="dropdown">
                                    Configuraciones
                                </a>
                                <ul class="dropdown-menu" role="menu" aria-labelledby="dropConf">
                                    @*
                                        <li role="presentation">
                                            @Html.ActionLink("Conf. Generales", "List", "Configuracion", null, new { @tabindex = "-1", @role = "menuitem" })
                                        </li>
                                        <li role="presentation" class="divider" />
                                        <li class="dropdown-submenu">
                                            <a tabindex="-1" href="#">Productos</a>
                                            <ul class="dropdown-menu">
                                                <li role="presentation">
                                                    @Html.ActionLink("Categorias", "List", "Categoria", null, new { @tabindex = "-1", @role = "menuitem" })
                                                </li>
                                                <li role="presentation">
                                                    @Html.ActionLink("Productos", "List", "Producto", null, new { @tabindex = "-1", @role = "menuitem" })
                                                </li>
                                            </ul>
                                        </li>*@
                                    <li role="presentation">
                                        @Html.ActionLink("Clientes", "List", "Cliente", null, new { @tabindex = "-1", @role = "menuitem" })
                                    </li>
                                    <li role="presentation" class="divider"></li>
                                    <li role="presentation">
                                        @Html.ActionLink("Cargos", "List", "Cargo", null, new { @tabindex = "-1", @role = "menuitem" })
                                    </li>
                                    <li role="presentation">
                                        @Html.ActionLink("Empleados", "List", "Empleado", null, new { @tabindex = "-1", @role = "menuitem" })
                                    </li>
                                    <li role="presentation" class="divider"></li>
                                    <li role="presentation">
                                        @Html.ActionLink("Zonas", "List", "Zona", null, new { @tabindex = "-1", @role = "menuitem" })
                                    </li>
                                    <li role="presentation">
                                        @Html.ActionLink("Mesas", "List", "Mesa", null, new { @tabindex = "-1", @role = "menuitem" })
                                    </li>
                                    @*<li role="presentation" class="divider"></li>
                                        <li role="presentation">
                                            @Html.ActionLink("Mesas de Pool", "List", "Pool", null, new { @tabindex = "-1", @role = "menuitem" })
                                        </li>*@
                                    <li role="presentation" class="divider"></li>
                                    <li role="presentation">
                                        @Html.ActionLink("Categorias", "List", "Categoria", null, new { @tabindex = "-1", @role = "menuitem" })
                                    </li>
                                    <li role="presentation">
                                        @Html.ActionLink("Productos", "List", "Producto", null, new { @tabindex = "-1", @role = "menuitem" })
                                    </li>
                                    <li role="presentation" class="divider"></li>
                                    <li role="presentation">
                                        @Html.ActionLink("Promociones", "List", "Promocion", null, new { @tabindex = "-1", @role = "menuitem" })
                                    </li>
                                    <li role="presentation" class="divider"></li>
                                    <li role="presentation">
                                        @Html.ActionLink("Proveedores", "List", "Proveedor", null, new { @tabindex = "-1", @role = "menuitem" })
                                    </li>
                                </ul>
                            </li>
                            <li class="divider-vertical"></li>
                            <li>
                                <p class="navbar-text pull-right">
                                    @Html.ActionLink("Cerrar sesión", "Logout", "Account", null, new { @class = "navbar-link" })
                                </p>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    }

    @if (HttpContext.Current.User.Identity.IsAuthenticated && HttpContext.Current.User.Identity.Name == "mozo")
    {
        <div class="navbar navbar-fixed-top">
            <div class="navbar-inner">
                <div class="container">
                    <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    @Html.ActionLink("JACOVINO", "List", "OrdenMozo", null, new { @class = "brand" })

                    <div class="nav-collapse collapse">
                        <ul class="nav">
                            <li>@Html.ActionLink("Ordenes", "List", "OrdenMozo")</li>
                        </ul>

                        <p class="navbar-text pull-right">
                            @Html.ActionLink("Cerrar sesión", "Logout", "Account", null, new { @class = "navbar-link" })
                        </p>
                    </div>
                </div>
            </div>
        </div>
    }

    <div class="container">

        @RenderBody()
        <hr />
        <footer>
            <p>&copy;@DateTime.Now.Year - Powered by ConceptSoft</p>
        </footer>
    </div>
    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/bundles/bootstrap")

    <script type="text/javascript">
        $(document).ready(function () {
            $(".datetime").datetimepicker({
                format: 'dd/MM/yyyy HH:mm',
                pickSeconds: false
            });

            $(".date").datetimepicker({
                pickTime: false,
                format: 'dd/MM/yyyy'
            });

            $('.time').datetimepicker({
                pickDate: false,
                pickSeconds: false
            });

            //- Agrega tooltips
            $("[data-toggle='tooltip']").tooltip();

            //- Elimina validacion en campos Decimal
            $("[data-val-number]").removeAttr('data-val-number');

            //- Resulve el menu navbar en mobiles
            $('.dropdown-toggle').click(function (e) {
                e.preventDefault();
                setTimeout($.proxy(function () {
                    if ('ontouchstart' in document.documentElement) {
                        $(this).siblings('.dropdown-backdrop').off().remove();
                    }
                }, this), 0);
            });
        });

        ////- Resuelve submenus en mobiles
        //$(document).on('touchstart.dropdown.data-api', '.dropdown-submenu > a', function (event) {
        //    event.preventDefault();
        //});
    </script>
    @RenderSection("scripts", required: false)

</body>
</html>
